<template>
  {{x}}
  <button @click="x++">x++</button>
</template>

<script>
export default {
  props: ['name'],
  data () {
    return {
      x: 12
    }
  },
  methods: {
    a () {
      console.log('子组件的方法')
    }
  }
}
</script>

<style>

</style>